---
description: Generate TypeScript resolvers signatures for your GraphQL schema. Supports Apollo Federation.
---

# Apollo Federation

The `typescript-resolvers` plugin also supports [Apollo Federation](https://apollographql.com/docs/apollo-server/federation/introduction).

To use it, add `federation: true{:ts}` to your configuration:

```ts {6-7}
import { CodegenConfig } from '@graphql-codegen/cli'

const config: CodegenConfig = {
  generates: {
    './src/types.ts': {
      plugins: ['typescript', 'typescript-resolvers'],
      config: { federation: true }
    }
  }
}
export default config
```

It will add the required GraphQL directives to your codegen schema and generate a compatible resolvers signature for [Apollo Federation](https://the-guild.dev/graphql/hive/federation).
